package com.example.demo.study.account;

import java.time.LocalDate;

// 记账类
public class Account {
    private int id;
    private LocalDate date;
    private double amount;
    private String category;
    private String remark;
    // 构造函数、getter和setter方法
    public Account(int id, LocalDate date, double amount, String category, String remark) {
        this.id = id;
        this.date = date;
        this.amount = amount;
        this.category = category;
        this.remark = remark;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", date=" + date +
                ", amount=" + amount +
                ", category='" + category + '\'' +
                ", remark='" + remark + '\'' +
                '}';
    }
}
